Optimal. Leaf size=138 \[ \frac {2 B \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{d \sqrt {a+b \sec (c+d x)}}+\frac {2 C \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \Pi \left (2;\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{d \sqrt {a+b \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 44, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4157, 4121,
3943, 2742, 2740, 3944, 2886, 2884} \begin {gather*} \frac {2 B \sqrt {\sec (c+d x)} \sqrt {\frac {a \cos (c+d x)+b}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{d \sqrt {a+b \sec (c+d x)}}+\frac {2 C \sqrt {\sec (c+d x)} \sqrt {\frac {a \cos (c+d x)+b}{a+b}} \Pi \left (2;\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )}{d \sqrt {a+b \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2740
Rule 2742
Rule 2884
Rule 2886
Rule 3943
Rule 3944
Rule 4121
Rule 4157
Rubi steps
\begin {align*} \int \frac {B \sec (c+d x)+C \sec ^2(c+d x)}{\sqrt {\sec (c+d x)} \sqrt {a+b \sec (c+d x)}} \, dx &=\int \frac {\sqrt {\sec (c+d x)} (B+C \sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=B \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+b \sec (c+d x)}} \, dx+C \int \frac {\sec ^{\frac {3}{2}}(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {\left (B \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {b+a \cos (c+d x)}} \, dx}{\sqrt {a+b \sec (c+d x)}}+\frac {\left (C \sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec (c+d x)}{\sqrt {b+a \cos (c+d x)}} \, dx}{\sqrt {a+b \sec (c+d x)}}\\ &=\frac {\left (B \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{\sqrt {a+b \sec (c+d x)}}+\frac {\left (C \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \sqrt {\sec (c+d x)}\right ) \int \frac {\sec (c+d x)}{\sqrt {\frac {b}{a+b}+\frac {a \cos (c+d x)}{a+b}}} \, dx}{\sqrt {a+b \sec (c+d x)}}\\ &=\frac {2 B \sqrt {\frac {b+a \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{d \sqrt {a+b \sec (c+d x)}}+\frac {2 C \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \Pi \left (2;\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right ) \sqrt {\sec (c+d x)}}{d \sqrt {a+b \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.30, size = 91, normalized size = 0.66 \begin {gather*} \frac {2 \sqrt {\frac {b+a \cos (c+d x)}{a+b}} \left (B F\left (\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )+C \Pi \left (2;\frac {1}{2} (c+d x)|\frac {2 a}{a+b}\right )\right ) \sqrt {\sec (c+d x)}}{d \sqrt {a+b \sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.37, size = 277, normalized size = 2.01
method | result | size |
default | \(\frac {2 \sqrt {\frac {b +a \cos \left (d x +c \right )}{\left (1+\cos \left (d x +c \right )\right ) \left (a +b \right )}}\, \left (B \EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right )-C \EllipticF \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \sqrt {-\frac {a +b}{a -b}}\right )+2 C \EllipticPi \left (\frac {\left (-1+\cos \left (d x +c \right )\right ) \sqrt {\frac {a -b}{a +b}}}{\sin \left (d x +c \right )}, \frac {a +b}{a -b}, \frac {i}{\sqrt {\frac {a -b}{a +b}}}\right )\right ) \sqrt {\frac {b +a \cos \left (d x +c \right )}{\cos \left (d x +c \right )}}\, \sqrt {\frac {1}{1+\cos \left (d x +c \right )}}\, \left (\sin ^{2}\left (d x +c \right )\right )}{d \left (-1+\cos \left (d x +c \right )\right ) \left (b +a \cos \left (d x +c \right )\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sqrt {\frac {a -b}{a +b}}}\) | \(277\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \sqrt {\sec {\left (c + d x \right )}}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}\,\sqrt {\frac {1}{\cos \left (c+d\,x\right )}}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________